package cn.zhukelili.generic;

/**
 * @Description: 场景类
 * @Auther: hongheshou
 * @Date: 2018/7/23 09:54
 */
public class Client {
    public static void main(String[] args) {
        //定义出发起人
        Originator originator = new Originator();
        //定义出备忘录管理员
        Caretaker caretaker = new Caretaker();
        //创建一个备忘录
        caretaker.setMemento(originator.createMemento());
        //恢复一个备忘录
        originator.restoreMemento(caretaker.getMemento());
    }
}
